<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/2/27
 * Time: 14:47
 */

namespace app\api\controller;

use app\common\controller\HomeBase;
use think\Controller;
use think\Db;
use think\View;
use think\Request;

class Blog extends HomeBase{

    public function _initialize(){
    }

    // 写入检查日志
    public function jss($jss){
        $jsss = ['json_str'=>$jss,'check_time'=>time()];
        $data = Db::name('wxurlscheck')->insert($jsss);
        return json($data);
    }

    /*
     * 查看域名检查系统运行情况
     * */
    public function check(){
        // 获取最新的10个记录 ['check_time'=>'DESC']
        // $url_data = Db::name('urltj')->order($order)->paginate($acount, false, ['query'=>['page'=>$page,'keyword'=>$keyword,'ip' => $ip,'order'=>$order]]);
        $data = Db::name('wxurlscheck')->order(['check_time'=>'DESC'])->limit(10)->select();
        return json($data);
    }



}